from docx import Document
import pandas as pd

# 读取 docx 文件
docx_path = "Generali-GenConnect-CR#24-G30SDL-2324 Payment-Enhancement for changing service provider to Wonder v3.0_副本.docx"
doc = Document(docx_path)
before = []
after = []
current = None

for para in doc.paragraphs:
    text = para.text.strip()
    if not text:
        continue
    if "Before Change" in text:
        current = "before"
        continue
    if "After Change" in text:
        current = "after"
        continue
    if current == "before":
        before.append(text)
    elif current == "after":
        after.append(text)

print("==== Before Change ====")
print("\n".join(before))
print("\n==== After Change ====")
print("\n".join(after))

# 读取 xlsx 文件
xlsx_path = "Upload payment proof_GC_20250401-2.xlsx"
df = pd.read_excel(xlsx_path)
print("\n==== Excel 内容预览 ====")
print(df.head(10).to_string(index=False))